import request from '@/utils/request'
const base = '/log/jobexecutionhistory'

/**
 * 查询JobExecutionHistory数据列表
 * @param {Object} query - 查询参数
 * @returns {Promise} - Axios请求的Promise对象
 */
export function listJobExecutionHistory(query) {
  return request({
    url: `${base}/list`,
    method: 'get',
    params: query
  })
}

/**
 * 查询JobExecutionHistory数据详细
 * @param {number} id - JobExecutionHistory的唯一标识
 * @returns {Promise} - Axios请求的Promise对象
 */
export function getJobExecutionHistory(id) {
  return request({
    url: `${base}/${id}`,
    method: 'get'
  })
}



/**
 * 删除JobExecutionHistory数据
 * @param {number|number[]} ids - 要删除的JobExecutionHistory的ID，支持单个ID或ID数组
 * @returns {Promise} - Axios请求的Promise对象
 */
export function delJobExecutionHistory(ids) {
  return request({
    url: `${base}`,
    method: 'delete',
    data: ids  
  })
}


/**
 * 清空所有作业执行历史记录
 * @returns {Promise} - Axios请求的Promise对象
 */
export function clearAllJobExecutionHistory() {
  return request({
    url: `${base}/clear`,
    method: 'delete'
  })
}


